package com.nlp.trie.experiment2;

import com.nlp.trie.FileRW;

public class Test {
	
	public static void main(String[] args) {
		FileRW rw = new FileRW();
		String content = rw.read("E:\\search\\nlp\\trie\\src\\main\\resources\\199801.txt");
		//System.out.println(content);
		HMMFactory factory = new HMMFactory();
		HMM hmm = factory.createHMM(content);
		String str = "台湾 是 中国 领土 不可分割 的 部分";
		String s2 = "[ns, r, nr, n, l, u, n]";
		String[] s1 = str.split(" ");
		String s = hmm.viterbi(s1);
		System.out.println(s);
		boolean f = s2.equals(s);
		System.out.println(f);
	}

}
